package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.dto.NursingProjectPlanDto;
import com.zzyl.entity.NursingPlan;
import com.zzyl.vo.NursingPlanVo;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface NursingPlanMapper {

    @Select("select * from nursing_plan")
    List<NursingPlanVo> getAll();

    void insert(NursingPlan bean);

    void insertPlans(List<NursingProjectPlanDto> projectPlans);


    Page<NursingPlanVo> getByPage(@Param("name") String name, @Param("status") Integer status);


    NursingPlanVo getById(Long id);

    void update(NursingPlan nursingPlan);

    @Delete("delete from nursing_plan where id = #{id}")
    void deleteGetById(Long id);

    @Update("update nursing_plan set status = #{status} where id = #{id}")
    void startOrStop(Long id, Long status);
}
